home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Resources / Partition Logic 0.61 / partlogic-0.61.iso / system / headers / time.h < prev    next >
C/C++ Source or Header  |  2006-01-31  |  2KB  |  61 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2006 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  time.h
  20. //
  21.  
  22. // This is the Visopsys version of the standard header file time.h
  23.  
  24. #if !defined(_TIME_H)
  25.  
  26. #include <stddef.h>
  27.  
  28. #define SECPERMIN 60
  29. #define SECPERHR  (SECPERMIN * 60)
  30. #define SECPERDAY (SECPERHR * 24)
  31. #define SECPERYR  (SECPERDAY * 365)
  32.  
  33. #define CLOCKS_PER_SEC
  34.  
  35. #ifndef NULL
  36. #define NULL 0
  37. #endif
  38.  
  39. struct tm {
  40.   int tm_sec;    // seconds
  41.   int tm_min;    // minutes
  42.   int tm_hour;   // hours
  43.   int tm_mday;   // day of the month
  44.   int tm_mon;    // month
  45.   int tm_year;   // year
  46.   int tm_wday;   // day of the week
  47.   int tm_yday;   // day in the year
  48.   int tm_isdst;  // daylight saving time
  49. };
  50.  
  51. typedef unsigned clock_t;
  52. typedef unsigned time_t;
  53.  
  54. char *asctime(const struct tm *timeptr);
  55. clock_t clock(void);
  56. double difftime(time_t, time_t);
  57. time_t time(time_t *t);
  58.  
  59. #define _TIME_H
  60. #endif
  61.